package org.example.Contoller;

import org.example.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("json")
public class JsonController {
    @PostMapping("data")
    @ResponseBody
    public String jsonData(@RequestBody User user
    )
    {
        System.out.println(user.toString());
        return user.toString();
    }
}
